<?php

namespace app\model;

use think\Model;

class TrainingTask extends Model
{
    protected $table = 'training_tasks';

    public function project()
    {
        return $this->belongsTo(ProjectModel::class);
    }

    public function creator()
    {
        return $this->belongsTo(UserModel::class, 'creator_id');
    }

    public function logs()
    {
        return $this->hasMany(TrainingLogModel::class, 'task_id');
    }
}